﻿using System.Windows;
using Prism.Commands;
using Prism.Mvvm;
using Prism.Navigation.Regions;

namespace BomDiffAnalyst.ViewModels;

public class TopNavigationViewModel : BindableBase
{

    private readonly IRegionManager _regionManager;


    private bool _popupIsOpen;

    private DelegateCommand _minimizedCommand = default!;
    private DelegateCommand _maximizedCommand = default!;
    private DelegateCommand _closeCommand = default!;





    public bool PopupIsOpen
    {
        get => _popupIsOpen;
        set => SetProperty(ref _popupIsOpen, value);
    }





    private Window MainWindow => Application.Current.MainWindow;

    public DelegateCommand MinimizedCommand =>
        _minimizedCommand ??= new(() => MainWindow.WindowState = WindowState.Minimized);

    public DelegateCommand MaximizedCommand =>
        _maximizedCommand ??= new(() => MainWindow.WindowState = MainWindow.WindowState == WindowState.Maximized ? WindowState.Normal : WindowState.Maximized);

    public DelegateCommand CloseCommand =>
        _closeCommand ??= new(MainWindow.Close);

    public TopNavigationViewModel(IRegionManager regionManager)
    {

        _regionManager = regionManager;




    }




}
